<!--会员权益-->
<template>
  <div>
    <head-nav></head-nav>

    <div class="vipRightBox">
      <!-- <div class="information">
        <p>会员: <span>{{userInfo.XF_SURNAME}}</span></p>
        <p>您当前会员等级: <span>V{{userInfo.XF_GRADE}}</span></p>
      </div> -->
      <div class="jfmx">
        <p class="jfmx_top">会员权益</p>
      </div>
      <div class="qygz contentA" v-html="content">

      </div>
      <!--<div class="qygz" v-for="qyItem in qymx">-->
        <!--<p> {{qyItem.hyjb}}</p>-->
        <!--<ul>-->
          <!--<li v-for="(qytm,index) in  qyItem.qytm">-->
            <!--<p>{{index+1}}) {{qytm}}</p>-->
          <!--</li>-->
        <!--</ul>-->
      <!--</div>-->
    </div>
  </div>
</template>

<script>
  import api from '@/api/api'
  export default {
    name: "VipRights",
    data() {
      return {
        userInfo:{},
        content:''
      }
    },
    mounted() {
      let that = this;
      api.getUserQy(this, res => {
        let data = res.data;
        if (data.code === 0 ){
          that.content = data.data
          that.$nextTick(function(){
            uParse('.contentA', {
              rootPath: '/static/libs/ueditor/'
            })
          });
        }
      })
      api.getUserInfo(this,res=>{
        let that = this;
        api.getUserInfo(this, res => {
          // console.log(res);
          let data = res.data;
          if (data.code === 0) {
            that.userInfo = data.data;
          }else if(data.code === 9999){
            //orcal数据库异常 关闭当前窗口
            MessageBox.alert(data.msg, '温馨提示').then(action => {
              wx.closeWindow()
            })
          }else {
            MessageBox('提示',data.msg)
          }
        })
      })
    }
  }
</script>

<style scoped lang="less">
  li{
    list-style: none;
  }
  .vipRightBox {
    padding: .3rem .4rem;
    margin: 0.8rem 0 0.9rem 0;
    background: #FFF;
    .information {
      background: #F05DC4;
      display: flex;
      justify-content: space-between;
      padding: .1rem .4rem;
    }
    .jfmx {
      margin-top: .3rem;
      .jfmx_top {
        font-weight: bold;
        padding: .1rem .2rem;
        line-height: .5rem;
        border-bottom: 1px solid #888;
      }
    }
    .qygz {
      margin-top: .2rem;
      font-size: 12pt;
      color: #888;
      line-height: 0.5rem;
      margin-bottom: .3rem;
      ul {
        li {
          p {
            font-size: 11pt;
          }
        }
      }
    }
  }
</style>
